<template>
  <div>{{ companiesMap.get(Number(props.renderValue)) }}</div>
</template>
<script lang="ts" setup>
import { reactive, onMounted } from "vue";
import type { TableColumn, TableRow } from "@/utils/baTable"; //表格列行类型
import { useBusiness } from "@/store/backend/BusinessM/info";

const business = useBusiness();
const { companiesMap } = business;
// BuildAdmin将自动为此组件传递五个Props
interface Props {
  renderValue: any; // 单元格值
  renderRow: TableRow; // 当前行数据
  renderField: TableColumn; // 当前列数据
}
const state: { name: string } = reactive({ name: "" });
const props = defineProps<Props>();
const dealMap = (id: any) => {
  state.name = companiesMap.get(id);
};
onMounted(() => {
  dealMap(props.renderValue);
});
</script>
<style lang="scss" scoped></style>
